package com.gnerv.cms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gnerv.cms.dto.SiteDTO;
import com.gnerv.cms.dto.SiteSaveDTO;
import com.gnerv.cms.dto.SiteSearchDTO;
import com.gnerv.cms.entity.Site;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 基础平台-站点配置表 Mapper 接口
 * </p>
 *
 * @author Gnerv LiGen
 * @since 2019-10-10
 */
@Mapper
public interface SiteMapper extends BaseMapper<Site> {

    int updateSiteStatus(@Param(value = "siteId") String siteId, @Param(value = "status") Integer status);

    SiteDTO selectSite(@Param(value = "siteId") String siteId);

    SiteDTO selectSiteByNameOrCode(@Param(value = "search") SiteSearchDTO search);

    List<SiteDTO> listSite(@Param(value = "search") SiteSearchDTO search);

    int bindSiteCatalog(@Param(value = "siteId") String siteId, @Param(value = "catalogId") String catalogId);

    int unBindSiteCatalog(@Param(value = "catalogId") String catalogId);
}
